﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="ListCustomer.aspx.cs" Inherits="SES.CMS.AdminCP.ListCustomer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 30px;
            width: 183px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <h1 class="title">
                Danh sách khách hàng</h1>
            <div class="search">
                <fieldset class="fieldset">
                    <legend>Lọc hiển thị</legend>
                    <table width="100%">
                        <tr>
                            <td style="width: 282px">
                                <label style="width: 100px;">
                                    Sắp xếp theo</label>
                                <asp:DropDownList ID="dropSort" runat="server" CssClass="dropDown" AutoPostBack="True"
                                    Width="150px" OnSelectedIndexChanged="dropSort_SelectedIndexChanged">
                                    <asp:ListItem Text="Thành viên" Value="1" Selected="True" />
                                    <asp:ListItem Text="Vãng lai" Value="2" />
                                </asp:DropDownList>
                            </td>
                            <td align="left" style="display:none">
                                <label>
                                    Tình trạng</label>
                                <asp:DropDownList ID="dropIsView" runat="server" CssClass="dropDown" Width="100px"
                                    AutoPostBack="True" OnSelectedIndexChanged="dropIsView_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Text="Tất cả" Selected="True" />
                                    <asp:ListItem Value="1" Text="Chưa đọc" />
                                    <asp:ListItem Value="2" Text="Đã đọc" />
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            <div id="gridview">
                <asp:GridView ID="gridView" runat="server" CssClass="tstyle1" Width="100%" AutoGenerateColumns="False"
                    CellPadding="3" EnableModelValidation="True" GridLines="None" AllowPaging="True"
                    BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellSpacing="1"
                    PageSize="10" OnRowDataBound="gridView_RowDataBound" OnPageIndexChanging="gridView_PageIndexChanging"
                    OnRowDeleting="gridView_RowDeleting" EmptyDataText="Dữ liệu trống !" OnRowCommand="gridView_RowCommand"
                    OnSelectedIndexChanged="gridView_SelectedIndexChanged">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <%# Container.DataItemIndex+1 %>
                            </ItemTemplate>
                            <ItemStyle Width="5px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Chọn">
                            <ItemTemplate>
                                <asp:CheckBox ID="checkBox" runat="server" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Id" HeaderText="ID">
                            <ItemStyle Width="10px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Họ tên">
                            <ItemTemplate>
                                <asp:Label ID="lbUser" runat="server" Text='<%#Eval("FullName")%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="40px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên đăng nhập">
                            <ItemTemplate>
                                <asp:Label ID="lbName" runat="server" Text='<%#Eval("UserName")%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="15px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Giới tính">
                            <ItemTemplate>
                                <asp:Label ID="lblsex" runat="server" Text='<%# ((Boolean)Eval("Sex")) == true ? "Nam" : "Nữ" %>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="30px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Ngày sinh">
                            <ItemTemplate>
                                <asp:Label ID="lbEmail" runat="server" Text='<%# Eval("Brithday","{0:dd/MM/yyyy}")%>'></asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="30px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:ButtonField CommandName="view" HeaderText="Chi tiết">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle ForeColor="#000099" CssClass="btnView" Width="10px" HorizontalAlign="Center" />
                        </asp:ButtonField>
                        <asp:TemplateField HeaderText="Thao tác">
                            <ItemTemplate>
                                <asp:LinkButton ID="linkDelete" runat="server" CausesValidation="false" Text="" CssClass="btnDelete"
                                    CommandName="Delete" OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')">
                                </asp:LinkButton>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle Width="20px" HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <img src="../../Images/ajax-loader.gif" alt="Loadding" style="position: absolute;
                            top: 50%; left: 50%; z-index: 1000" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </div>
            <div>
                <table style="width: 100%">
                    <tr>
                        <td align="left" valign="top">
                            <asp:LinkButton ID="linkCheckAll" runat="server" Text="Chọn tất cả" CssClass="button-gg-green"
                                OnClick="linkCheckAll_Click" />&nbsp; &nbsp; &nbsp;
                            <asp:LinkButton ID="linkUnCheckAll" runat="server" Text="Bỏ chọn" CssClass="button-gg-green"
                                OnClick="linkUnCheckAll_Click" />
                        </td>
                        <td align="right">
                            <asp:Button runat="server" ID="btnXoaChon" Text="Xóa chọn" CssClass="button-gg-green"
                                OnClientClick="return confirm('Bạn có chắc chắn muốn xóa ?')" OnClick="btnXoaChon_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="margin: 10px 0px">
                <label style="width: 200px">
                    Số dòng hiển thị trên 1 trang :
                </label>
                <asp:DropDownList runat="server" ID="dropPageSize" CssClass="dropdown" AutoPostBack="true"
                    OnSelectedIndexChanged="dropCountRow_SelectedIndexChanged">
                    <asp:ListItem Text=" 10 " Value="10" Selected="True" />
                    <asp:ListItem Text=" 20 " Value="20" />
                    <asp:ListItem Text=" 30 " Value="30" />
                    <asp:ListItem Text=" 50 " Value="50" />
                    <asp:ListItem Text=" 100 " Value="100" />
                </asp:DropDownList>
            </div>
            <fieldset id="details" visible="false" class="fieldset" runat="server">
                <legend>Chi tiết khách hàng</legend>
                <div style="margin-top: 10px; padding-left: 150px;">
                    <table style="font-size: 12px;" width="100%" cellspacing="0">
                        <tr>
                            <td class="style1">
                                Tên đăng nhập:
                            </td>
                            <td>
                                <asp:TextBox ID="ltUsername" Width="411px" runat="server" ReadOnly="True" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Mật khẩu:
                            </td>
                            <td>
                                <asp:TextBox ID="ltPassword" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Xác nhận mật khẩu:
                            </td>
                            <td>
                                <asp:TextBox ID="ltPassrepeat" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Họ tên:
                            </td>
                            <td>
                                <asp:TextBox ID="ltFullname" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Giới tính:
                            </td>
                            <td>
                                <%--<asp:TextBox ID="ltSex" Width="411px" runat="server" />--%>
                                <asp:RadioButton ID="radioNam" GroupName="sex" runat="server" />Nam &nbsp;&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioButton1" GroupName="sex" runat="server" />Nữ
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Ngày sinh:
                            </td>
                            <td>
                                <asp:TextBox ID="ltBrithday" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Email :
                            </td>
                            <td>
                                <asp:TextBox ID="ltEmail" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Phone :
                            </td>
                            <td>
                                <asp:TextBox ID="ltPhone" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 5px;" class="style1">
                                Địa chỉ :
                            </td>
                            <td>
                                <asp:TextBox ID="ltAddress" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Ngày đăng ký:
                            </td>
                            <td>
                                <asp:TextBox ID="ltDayregister" Width="411px" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style1">
                                Trạng thái:
                            </td>
                            <td>
                                <asp:RadioButton ID="RadioBat" GroupName="status" runat="server" />Đã kích hoạt
                                &nbsp;&nbsp;&nbsp;
                                <asp:RadioButton ID="RadioTat" GroupName="status" runat="server" />Đã khóa
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 5px;" class="style1">
                                Loại khách hàng:
                            </td>
                            <td>
                                <asp:RadioButton ID="rdoThanhvien" GroupName="vanglai" runat="server" />Thành viên
                                &nbsp;&nbsp;&nbsp;
                                <asp:RadioButton ID="rdoVanglai" GroupName="vanglai" runat="server" />Vãng lai
                            </td>
                        </tr>
                        <tr>
            <td style="padding-bottom: 5px;" class="style1">
            </td>
            <td>
                
                <asp:Button ID="btnCapnhat" CssClass="button-gg-green" runat="server" Text="Cập nhật" Visible="true"
                    OnClick="btnCapnhat_Click" />
                    <asp:Button ID="btnSua" CssClass="button-gg-green" runat="server" Text="Hủy" OnClick="btnSua_Click" />
                &nbsp;
            </td>
        </tr>
                    </table>
                </div>
                    </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
    <table>
        
    </table>

    <div style="margin-top: 10px">
        <asp:Literal ID="lbThongBao" runat="server" />
    </div>
</asp:Content>
